package cn.chiship.framework.upms.biz.user.service;

import cn.chiship.framework.upms.biz.user.entity.UpmsOrganizationExample;
import cn.chiship.sdk.core.base.BaseResult;
import cn.chiship.sdk.framework.base.BaseService;
import cn.chiship.framework.upms.biz.user.entity.UpmsOrganization;

/**
 * 组织业务接口层
 * 2021/9/27
 *
 * @author lijian
 */
public interface UpmsOrganizationService extends BaseService<UpmsOrganization, UpmsOrganizationExample> {
    /**
     * 机构编码生成
     *
     * @param pid
     * @return
     */
    BaseResult generateOrgCode(String pid,Byte type);

    /**
     * 生成邀请码
     *
     * @param id
     * @return
     */
    BaseResult invitationCode(String id);

    /**
     * 根据邀请码获取机构信息
     *
     * @param code
     * @return
     */
    BaseResult getByInvitation(String code);

    /**
     * 设置负责人
     *
     * @param organizationId
     * @param userId
     * @param realName
     * @return
     */
    BaseResult setChargePerson(String organizationId, String userId, String realName);

    /**
     * 组织机构调整
     * @param organizationId
     * @param targetOrg
     * @return
     */
    BaseResult adjustment(String organizationId,String targetOrg);
}
